package com.luyi.springcloud.service;

import com.luyi.consumer.api.entity.CommonResult;
import com.luyi.consumer.api.entity.Payment;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * feign功能使用的接口
 * @author 卢意
 * @create 2020-10-25 10:05
 */
@Component
@FeignClient(value = "CLOUD-PAYMENT-SERVICE")
public interface PaymentFeignService {
	@GetMapping("/payment/get/{id}")
	public CommonResult<Payment> getPaymentById(@PathVariable("id") Long id );

	@GetMapping(value = "/payment/feign/timeout")
	public String paymentFeignTimeOut();
}
